home *** CD-ROM | disk | FTP | other *** search
/ CD Classic 39 / CD CLASSIC #39 (1998).iso / EMPRESA / visio / Vistdstd / Install / Data.Z / MyAddon.CPP < prev    next >
C/C++ Source or Header  |  1997-05-21  |  919b  |  35 lines

  1. /* MYADDON.CPP - Sample C++ addon; subclass of VAddon
  2.  * Copyright (C) 1996-1997 Visio Corporation. All rights reserved.
  3.  *
  4.  *
  5.  *    You have a royalty-free right to use, modify, reproduce and distribute
  6.  *    the Sample Application Files (and/or any modified version) in any way
  7.  *    you find useful, provided that you agree that Visio has no warranty,
  8.  *    obligations or liability for any Sample Application Files.
  9.  *
  10.  */
  11.  
  12. #include "vaddon.h"
  13.  
  14. #define ATTS (VAO_AOATTS_ISACTION | VAO_AOATTS_HASABOUT | VAO_AOATTS_WAITCRSR)
  15.  
  16. class MyAddon : public VAddon {
  17.  
  18. public:
  19.     MyAddon(LPCTSTR pName):VAddon(ATTS, VAO_ENABLEALWAYS, 0, 0, pName) { };
  20.     VAORC Run(LPVAOV2LSTRUCT pV2L);
  21. };
  22.  
  23.  
  24. //    Instantiate 2 (or more!) addons:
  25. MyAddon addon01("Hi Nathan!");
  26. MyAddon addon02("Hi Rachel!");
  27.  
  28.  
  29.  
  30. VAORC MyAddon::Run(LPVAOV2LSTRUCT pV2L)
  31. {
  32.     MessageBox(NULL, GetName(), "MyAddon", MB_OK);
  33.     return VAORC_SUCCESS;
  34. }
  35.